package HomeWork;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class homework02 {
    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入生日：");
        String sr=sc.nextLine();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyy-MM-dd");
        Date date = new Date();
        Date parse = simpleDateFormat.parse(sr);
        long time = parse.getTime();
        long time1 = date.getTime();
        System.out.println( (time1-time) / (24 * 60 * 60 * 1000));
    }
}
